<template>
	<view class="content">
		<view class="section-0">
			<view class="section-body">
				<view class="actions">
					<view class="problem-wrapper" v-if="timeList.length<=0">
						<image src="https://www.mescroll.com/img/mescroll-empty.png"></image>
						<view class="">~ 空空如也 ~</view>
					</view>
					<view class="label" v-for="item in timeList" @click="go(item)">
						<view class="title" >
							<view class="text">
								{{ item.dw_name }}
							</view>
							<view class="tiem">
								{{ item.time ? item.time.substring(0, 10) : '-' }}
							</view>
						</view>
						<view class="fraction">
							{{ item.kf_point}}分
							<text class="iconfont icon-xiangyou1"></text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
import { ProjectTeamGetComment } from '@/api/statistics.js'
export default {
	data() {
		return {
			timeList: [],
			project_id:'',
			type:'',
			company_id:'',
			date:'',
		}
	},
	methods: {
		go(item) {
			const params = {
				project_id: this.project_id,
				type: this.type,
				company_id:this.company_id,
				date:item.time,
				dw_name:item.dw_name,
			}
			uni.navigateTo({
				url: '/pages/statistics/safety/team/point/info/index?params=' + JSON.stringify(params)
			})
		},
		// ProjectTeam(){
		// 	ProjectTeamGetComment({}).then(res=>{
				
		// 	})
		// }
	},
	onLoad(item) {
			const params = JSON.parse(item.params)
			this.project_id=params.project_id
			this.type=params.type
			if(params.type == '劳务分包' || params.type == '专业分包'){
				params.type = '施工单位'
			}
			this.company_id=params.company_id
			ProjectTeamGetComment({...params}).then(res=>{
				this.timeList=res.data.data
			})
	}
}
</script>

<style lang="scss" scoped>
.section-0 {
	width: 100%;
	background: #2e5efe;
	.section-body {
		border-top-left-radius: 60rpx;
		border-top-right-radius: 60rpx;
		width: 100vw;
		height: 100vh;
		background-color: #fff;
		overflow: hidden;
		.actions {
			padding: 50rpx ;
			.problem-wrapper {
						color: #808080;
						margin: 0 auto;
						text-align: center;
						image {
							margin-top: 300rpx;
							width: 200rpx;
							height: 200rpx;
						}
					}
			.label {
				display: flex;
				justify-content: space-between;
				margin-bottom: 30rpx;
				padding: 30rpx;
				border-radius: 30rpx;
				webkit-box-shadow: 0px 0px 10px #ccc;
				moz-box-shadow: 0px 0px 10px #ccc;
				box-shadow: 0px 0px 10px #ccc;
				.title{
					.text{
						width: 430rpx;
						font-size: 15px;
						margin-bottom: 5rpx;
						white-space: nowrap; 
						overflow: hidden;
						text-overflow: ellipsis;
					}
					.tiem{
						color: #7F98AE;
						font-size: 13px;
					}
				}
				.fraction{
					width: 150rpx;
					color: #2e5efe;
					font-weight: bold;
					margin-top: 10rpx;
					font-size: 20px;
					.iconfont{
						color: black;
						font-weight: normal;
						// margin-left: 20rpx;
						float: right;
						margin-top: 10rpx;
					}
				}
			}
		}
	}
}
</style>
